<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style media="screen">
        .a {
            width: 100px;
            height: 100px;
            border: 1px solid #ddd;
        }

        .b {
            width: 200px;
            height: 200px;
            border: 1px solid #ccc;
        }
    </style>
    <script type="text/javascript">
        function dragStart() {
            event.dataTransfer.effectAllowed = 'move';
            console.log(event);
            console.log('dragStart');
            return true;
        }

        function drag() {
            console.log('drag');
        }

        function dragEnd() {
            console.log('dragEnd');
        }

        function dragEnter(e) {
            console.log('dragEnter');
            event.preventDefault();
            return false;
        }

        function dragOver(e) {
            console.log('dragOver');
            return false;
        }

        function dragLeave() {
            console.log('dragLeave');
        }

        function drop() {
            event.stopPropagation();
            return false;
        }
    </script>
</head>
<body>
    <div class="a" draggable="true" ondragstart="return dragStart()"></div>
    <div class="b" ondragenter="return dragEnter()" ondragover="return dragOver()" ondragleave="dragLeave()" ondrop="return drop()"></div>
</body>
</html>
